import request from "@/utils/request";
import type { BaseResponse } from "../baseType";

enum API {
  FILE_UPLOAD_URL = "/admin/product/fileUpload",
}

export const fileUpload = (data: FileUploadReq) => {
  return request.post<any, FileUploadResp>(API.FILE_UPLOAD_URL, data);
};

interface FileUploadReq {
  file: File;
}
interface FileUploadResp extends BaseResponse {
  fileName: string;
}
